<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <div id="app">
        <h2>对象中的值：{{numbers.a}}</h2>
        <button @click="numbers.a++">修改对象中的值</button>
    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                numbers: {
                    a:1
                }
            },
            watch: {
                numbers:{
                    deep:true,
                    handler(){
                        console.log('numbers对象中的值改变了')
                    }
                }
            }
        })
    </script>
</body>
</html>